/*
ont-space - The ontology-based resource metadata repository
Copyright (c) 2006-2008, Information Eng. Research Unit - Univ. of Alcalá
http://www.cc.uah.es/ie
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License along
with this library; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
package org.ontspace.oki.owl;

import java.io.Serializable;
import org.ieee.ltsc.lom.LOM;
import org.ieee.ltsc.lom.LOMUtil;
import java.util.Date;
import org.ietf.mimedir.vcard.VCard;

/**
 * Creates a new instance of serialized learning object
 * @author Raquel
 */
public class OspaceOKISerializedLomImpl implements Serializable {

    LOM lom;
    private String General_AggregationLevel_Source;
    private String General_AggregationLevel_Value;
    private String General_Structure_Source;
    private String General_Structure_Value;
    private String LifeCycle_Status_Source;
    private String LifeCycle_Status_Value;
    private String MetaMetadata_Language;
    private String Technical_Size;
    private String Technical_Duration;
    private String Rights_Cost_Source;
    private String Rights_Cost_Value;
    private String Rights_CopyRightAndOtherRestrictions_Source;
    private String Rights_CopyRightAndOtherRestrictions_Value;
    private String[] catalogLOMGI;
    private String[] entryLOMGI;
    private String[] titGT;
    private String[] lanGT;
    private String[] languageLOMGI;
    private String[][] SourceGD;
    private String[][] lanGD;
    private String[][] SourceGK;
    private String[][] lanGK;
    private String[][] SourceGC;
    private String[][] lanGC;
    private String[] verLV;
    private String[] lanLV;
    private VCard[][] entityLC;
    private Date[] DateTimeLC;
    private String[][] DateDescriptionLC;
    private String[][] LanguageDateDescriptionLC;
    private String[] SourceRoleLC;
    private String[] ValueRoleLC;
    private String[] catalogMI;
    private String[] entryMI;
    private VCard[][] entityMC;
    private Date[] DateTimeMC;
    private String[][] DateDescriptionMC;
    private String[][] LanguageDateDescriptionMC;
    private String[] SourceRoleMC;
    private String[] ValueRoleMC;
    private String[] schemaLOMMS;
    private String[] formatTF;
    private String[] locationTL;
    private String[][] SourceTRType;
    private String[][] ValueTRType;
    private String[][] SourceTRName;
    private String[][] ValueTRName;
    private String[][] MinVerTR;
    private String[][] MaxVerTR;
    private String[] InstallationRemarksTIR;
    private String[] languageTIR;
    private String[] PlatformTOPR;
    private String[] languageTOPR;
    private String[] DurationDescriptionsTDD;
    private String[] LanguageDurationDescriptionsTDD;
    private String[] SourceInteractivityTypeEIT;
    private String[] ValueInteractivityTypeEIT;
    private String[][] SourceLearningResourceTypeELRT;
    private String[][] ValueLearningResourceTypeELRT;
    private String[] SourceInteractivityLevelEIL;
    private String[] ValueInteractivityLevelEIL;
    private String[] SourceSemanticDensityESD;
    private String[] ValueSemanticDensityESD;
    private String[][] SourceIntendedEndUserRoleEIEUR;
    private String[][] ValueIntendedEndUserRoleEIEUR;
    private String[][] SourceContextEC;
    private String[][] ValueContextEC;
    private String[][][] TypicalAgeRangeStringETAR;
    private String[][][] TypicalAgeRangeLanguageETAR;
    private String[] SourceDifficultyED;
    private String[] ValueDifficultyED;
    private String[] TypicalLearningTimeETLT;
    private String[][] DescriptionETLT;
    private String[][] LanguageDescriptionETLT;
    private String[][][] DescriptionED;
    private String[][][] LanguageDescriptionED;
    private String[][] LanguageEL;
    private String[] DescriptionRD;
    private String[] LanguageDescriptionRD;
    private String[] SourceKindRK;
    private String[] ValueKindRK;
    private String[][] CatalogRRI;
    private String[][] EntryRRI;
    private String[][][] DescriptionRRD;
    private String[][][] LanguageDescriptionRRD;
    private VCard[] EntityAE;
    private Date[] DateAD;
    private String[][] DateDescriptionAD;
    private String[][] LanguageDateDescriptionAD;
    private String[][] DescriptionAD;
    private String[][] LanguageDescriptionAD;
    private String[] SourcePurposeCP;
    private String[] ValuePurposeCP;
    private String[][][] StringSourceCTP;
    private String[][][] LanguageSourceCTP;
    private String[][][] IDTaxonCTP;
    private String[][][][] StringEntryTaxonCTP;
    private String[][][][] LanguageEntryTaxonCTP;
    private String[][] DescriptionCD;
    private String[][] LanguageDescriptionCD;
    private String[][][] KeywordCK;
    private String[][][] LanguageKeywordCK;
    private int NumberEducationals =
            0;
    private int NumberRelations =
            0;
    private int NumberAnnotations =
            0;
    private int NumberClassifications =
            0;
    private int NumberGeneralDescriptions =
            0;
    private int NumberGeneralKeywords =
            0;
    private int NumberGeneralCoverages =
            0;
    private int NumberLifeCycleContributes =
            0;
    private int NumberMetaMetadataContributes =
            0;
    private int NumberTechnicalRequirements =
            0;
    private int[] NumberEducationalTypicalAgeRanges;
    private int[] NumberEducationalDescriptions;
    private int[] NumberRelationDescriptions;
    private int[] NumberClassificationTaxonPaths;
    private int[] NumberClassificationKeywords;
    private int[] NumberTechnicalOrComposites;

    public OspaceOKISerializedLomImpl(LOM l) {
        lom =
                l;
        extractGeneral();
        extractLifeCycle();
        extractMetaMetadata();
        extractTechnical();
        extractEducational();
        extractRights();
        extractRelation();
        extractAnnotation();
        extractClassification();

    }

    public String getGeneralAggregationLevelSource() {
        return General_AggregationLevel_Source;
    }

    public String getGeneralAggregationLevelValue() {
        return General_AggregationLevel_Value;
    }

    public String getGeneralStructureSource() {
        return General_Structure_Source;
    }

    public String getGeneralStructureValue() {
        return General_Structure_Value;
    }

    public String getLifeCycleStatusSource() {
        return LifeCycle_Status_Source;
    }

    public String getLifeCycleStatusValue() {
        return LifeCycle_Status_Value;
    }

    public String getMetaMetadataLanguage() {
        return MetaMetadata_Language;
    }

    public String getTechnicalSize() {
        return Technical_Size;
    }

    public String getTechnicalDuration() {
        return Technical_Duration;
    }

    public String getRightsCostSource() {
        return Rights_Cost_Source;
    }

    public String getRightsCostValue() {
        return Rights_Cost_Value;
    }

    public String getRightsCopyRightAndOtherRestrictionsSource() {
        return Rights_CopyRightAndOtherRestrictions_Source;
    }

    public String getRightsCopyRightAndOtherRestrictionsValue() {
        return Rights_CopyRightAndOtherRestrictions_Value;
    }

    public String[] getGeneralIdentifierCatalog() {
        return catalogLOMGI;
    }

    public String[] getGeneralIdentifierEntry() {
        return entryLOMGI;
    }

    public String[] getGeneralTitleString() {
        return titGT;
    }

    public String[] getGeneralTitleLanguage() {
        return lanGT;
    }

    public String[] getGeneralLanguage() {
        return languageLOMGI;
    }

    public String[][] getGeneralDescriptionString() {
        return SourceGD;
    }

    public String[][] getGeneralDescriptionLanguage() {
        return lanGD;
    }

    public String[][] getGeneralKeywordString() {
        return SourceGK;
    }

    public String[][] getGeneralKeywordLanguage() {
        return lanGK;
    }

    public String[][] getGeneralCoverageString() {
        return SourceGC;
    }

    public String[][] getGeneralCoverageLanguage() {
        return lanGC;
    }

    public String[] getLifeCycleVersionString() {
        return verLV;
    }

    public String[] getLifeCycleVersionLanguage() {
        return lanLV;
    }

    public VCard[][] getLifeCycleContributeEntity() {
        return entityLC;
    }

    public Date[] getLifecycleContributeDateDateTime() {
        return DateTimeLC;
    }

    public String[][] getLifeCycleContributeDateDescriptionString() {
        return DateDescriptionLC;
    }

    public String[][] getLifeCycleContributeDateDescritionLanguage() {
        return LanguageDateDescriptionLC;
    }

    public String[] getLifeCycleContributeRoleSource() {
        return SourceRoleLC;
    }

    public String[] getLifeCycleContributeRoleValue() {
        return ValueRoleLC;
    }

    public String[] getMetaMetadataIdentifierCatalog() {
        return catalogMI;
    }

    public String[] getMetaMetadataIdentifierEntry() {
        return entryMI;
    }

    public VCard[][] getMetaMetadataContributeEntity() {
        return entityMC;
    }

    public Date[] getMetaMetadataContriuteDateDatetime() {
        return DateTimeMC;
    }

    public String[][] getMetaMetadataContributeDateDescriptionString() {
        return DateDescriptionMC;
    }

    public String[][] getMetaMetadataContributeDateDescriptionLanguage() {
        return LanguageDateDescriptionMC;
    }

    public String[] getMetaMetadataContributeRoleSource() {
        return SourceRoleMC;
    }

    public String[] getMetaMetadataContributeRoleValue() {
        return ValueRoleMC;
    }

    public String[] getMetaMetadataSchema() {
        return schemaLOMMS;
    }

    public String[] getTechnicalFormat() {
        return formatTF;
    }

    public String[] getTechnicalLocation() {
        return locationTL;
    }

    public String[][] getTechnicalRequirementOrCompositeTypeSource() {
        return SourceTRType;
    }

    public String[][] getTechnicalRequirementOrCompositeTupeValue() {
        return ValueTRType;
    }

    public String[][] getTechnicalRequirementOrCompositeNameSource() {
        return SourceTRName;
    }

    public String[][] getTechnicalRequirementOrCompositeNameValue() {
        return ValueTRName;
    }

    public String[][] getTechnicalRequirementOrCompositeMinimumVersion() {
        return MinVerTR;
    }

    public String[][] getTechnicalRequirementOrCompositeMaximumVersion() {
        return MaxVerTR;
    }

    public String[] getTechnicalInstallationRemarksString() {
        return InstallationRemarksTIR;
    }

    public String[] getTechnicalInstallationRemarksLanguage() {
        return languageTIR;
    }

    public String[] getTechnicalOtherPlatformRequirementsString() {
        return PlatformTOPR;
    }

    public String[] getTechnicalOtherPlatformRequirementsLanguage() {
        return languageTOPR;
    }

    public String[] getTechnicalDurationDescriptionString() {
        return DurationDescriptionsTDD;
    }

    public String[] getTechnicalDurationDescriptionLanguage() {
        return LanguageDurationDescriptionsTDD;
    }

    public String[] getEducationalInteractivityTypeSource() {
        return SourceInteractivityTypeEIT;
    }

    public String[] getEducationalInteractivityTypeValue() {
        return ValueInteractivityTypeEIT;
    }

    public String[][] getEducationalLearningResourceTypeSource() {
        return SourceLearningResourceTypeELRT;
    }

    public String[][] getEducationalLearningResourceTypeValue() {
        return ValueLearningResourceTypeELRT;
    }

    public String[] getEducationalInteractivityLevelSource() {
        return SourceInteractivityLevelEIL;
    }

    public String[] getEducationalInteractivityLevelValue() {
        return ValueInteractivityLevelEIL;
    }

    public String[] getEducationalSemanticDensitySource() {
        return SourceSemanticDensityESD;
    }

    public String[] getEducationalSemanticDensityValue() {
        return ValueSemanticDensityESD;
    }

    public String[][] getEducationalIntendedEndUserRoleSource() {
        return SourceIntendedEndUserRoleEIEUR;
    }

    public String[][] getEducationalIntendedEndUserRoleValue() {
        return ValueIntendedEndUserRoleEIEUR;
    }

    public String[][] getEducationalContextSource() {
        return SourceContextEC;
    }

    public String[][] getEducationalContextValue() {
        return ValueContextEC;
    }

    public String[][][] getEducationalTypicalAgeRangeString() {
        return TypicalAgeRangeStringETAR;
    }

    public String[][][] getEducationalTypicalAgeRangeLanguage() {
        return TypicalAgeRangeLanguageETAR;
    }

    public String[] getEducationalDifficultySource() {
        return SourceDifficultyED;
    }

    public String[] getEducationalDifficultyValue() {
        return ValueDifficultyED;
    }

    public String[] getEducationalTypicalLearningTime() {
        return TypicalLearningTimeETLT;
    }

    public String[][] getEducationalTypicalLearningTimeDescriptionString() {
        return DescriptionETLT;
    }

    public String[][] getEducationalTypicalLearningTimeDescriptionLanguage() {
        return LanguageDescriptionETLT;
    }

    public String[][][] getEducationalDescriptionString() {
        return DescriptionED;
    }

    public String[][][] getEducationalDescriptionLanguage() {
        return LanguageDescriptionED;
    }

    public String[][] getEducationalLanguage() {
        return LanguageEL;
    }

    public String[] getRightsDescriptionString() {
        return DescriptionRD;
    }

    public String[] getRightsDescriptionLanguage() {
        return LanguageDescriptionRD;
    }

    public String[] getRelationKindSource() {
        return SourceKindRK;
    }

    public String[] getRelationKindValue() {
        return ValueKindRK;
    }

    public String[][] getRelationResourceCatalog() {
        return CatalogRRI;
    }

    public String[][] getRelationResourceEntry() {
        return EntryRRI;
    }

    public String[][][] getRelationResourceDescriptionString() {
        return DescriptionRRD;
    }

    public String[][][] getRelationResourceDescriptionLanguage() {
        return LanguageDescriptionRRD;
    }

    public VCard[] getAnnotationEntity() {
        return EntityAE;
    }

    public Date[] getAnnotationDateDateTime() {
        return DateAD;
    }

    public String[][] getAnnotationDateDescriptionString() {
        return DateDescriptionAD;
    }

    public String[][] getAnnotationDateDescriptionLanguage() {
        return LanguageDateDescriptionAD;
    }

    public String[][] getAnnotationDescriptionString() {
        return DescriptionAD;
    }

    public String[][] getAnnotationDescriptionLanguage() {
        return LanguageDescriptionAD;
    }

    public String[] getClassificationPurposeSource() {
        return SourcePurposeCP;
    }

    public String[] getClassificationPurposeValue() {
        return ValuePurposeCP;
    }

    public String[][][] getClassificationTaxonPathSourceString() {
        return StringSourceCTP;
    }

    public String[][][] getClassificationTaxonPathSourceLanguage() {
        return LanguageSourceCTP;
    }

    public String[][][] getClassificationTaxonPathSourceTaxonId() {
        return IDTaxonCTP;
    }

    public String[][][][] getClassificationTaxonPathSourceTaxonEntryString() {
        return StringEntryTaxonCTP;
    }

    public String[][][][] getClassificationTaxonPathSourceTaxonEntryLanguage() {
        return LanguageEntryTaxonCTP;
    }

    public String[][] getClassificationDescriptionString() {
        return DescriptionCD;
    }

    public String[][] getClassificationDescriptionLanguage() {
        return LanguageDescriptionCD;
    }

    public String[][][] getClassificationKeywordString() {
        return KeywordCK;
    }

    public String[][][] getClassificationKeywordLanguage() {
        return LanguageKeywordCK;
    }

    public boolean hasGeneral() {
        if (LOMUtil.getGeneral(lom) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasLifeCycle() {
        if (LOMUtil.getLifeCycle(lom) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasMetaMetadata() {
        if (LOMUtil.getMetaMetadata(lom) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasTechnical() {
        if (LOMUtil.getTechnical(lom) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasEducational() {
        if (LOMUtil.getEducational(lom, 0) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasRights() {
        if (LOMUtil.getRights(lom) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasRelation() {
        if (LOMUtil.getRelation(lom, 0) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasAnnotation() {
        if (LOMUtil.getAnnotation(lom, 0) != null) {
            return true;
        } else {
            return false;
        }
    }

    public boolean hasClassification() {
        if (LOMUtil.getClassification(lom, 0) != null) {
            return true;
        } else {
            return false;
        }
    }

    public int getNumberEducationals() {
        return NumberEducationals;
    }

    public int getNumberRelations() {
        return NumberRelations;
    }

    public int getNumberAnnotations() {
        return NumberAnnotations;
    }

    public int getNumberClassifications() {
        return NumberClassifications;
    }

    public int getNumberGeneralDescriptions() {
        return NumberGeneralDescriptions;
    }

    public int getNumberGeneralKeywords() {
        return NumberGeneralKeywords;
    }

    public int getNumberGeneralCoverages() {
        return NumberGeneralCoverages;
    }

    public int getNumberLifeCycleContributes() {
        return NumberLifeCycleContributes;
    }

    public int getNumberMetaMetadataContributes() {
        return NumberMetaMetadataContributes;
    }

    public int getNumberTechnicalRequirements() {
        return NumberTechnicalRequirements;
    }

    public int[] getNumberEducationalTypicalAgeRanges() {
        return NumberEducationalTypicalAgeRanges;
    }

    public int[] getNumberEducationalDescriptions() {
        return NumberEducationalDescriptions;
    }

    public int[] getNumberRelationDescriptions() {
        return NumberRelationDescriptions;
    }

    public int[] getNumberClassificationTaxonPaths() {
        return NumberClassificationTaxonPaths;
    }

    public int[] getNumberClassificationKeywords() {
        return NumberClassificationKeywords;
    }

    public int[] getNumberTechnicalRequirementOrComposites() {
        return NumberTechnicalOrComposites;
    }

    private void extractGeneral() {

        int numGeneral_Identifier =
                0;
        int numGeneral_Title =
                0;
        int numGeneral_Language =
                0;
        int numGeneral_Description =
                0;
        int numGeneral_Description_Childrens =
                0;
        int numGeneral_Keyword =
                0;
        int numGeneral_Keyword_Childrens =
                0;
        int numGeneral_Coverage =
                0;
        int numGeneral_Coverage_Childrens =
                0;
        //Extract General-Identifier
        while ((LOMUtil.getCatalog(LOMUtil.getGeneralIdentifier(lom,
                numGeneral_Identifier)) != null)) {
            numGeneral_Identifier++;
        }
        catalogLOMGI =
                new String[numGeneral_Identifier];
        entryLOMGI =
                new String[numGeneral_Identifier];
        for (int i =
                0; i < numGeneral_Identifier; i++) {
            catalogLOMGI[i] =
                    String.valueOf(LOMUtil.getCatalog(LOMUtil.getGeneralIdentifier(lom,
                    i)));
            entryLOMGI[i] =
                    String.valueOf(LOMUtil.getEntry(LOMUtil.getGeneralIdentifier(lom,
                    i)));

        }

        //Extract General-Title

        String titleGT =
                String.valueOf(LOMUtil.getString(LOMUtil.getGeneralTitle(lom),
                numGeneral_Title));

        while ((!titleGT.equals("null"))) {
            numGeneral_Title++;

            titleGT =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralTitle(lom),
                    numGeneral_Title));

        }
        titGT =
                new String[numGeneral_Title];
        lanGT =
                new String[numGeneral_Title];
        for (int i =
                0; i < numGeneral_Title; i++) {
            titGT[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralTitle(lom),
                    i));
            lanGT[i] =
                    String.valueOf(LOMUtil.getLanguage(LOMUtil.getGeneralTitle(lom),
                    i));


        }

        //Extract General-language
        while (LOMUtil.getGeneralLanguage(lom, numGeneral_Language) != null) {
            numGeneral_Language++;
        }
        languageLOMGI =
                new String[numGeneral_Language];
        for (int i =
                0; i < numGeneral_Language; i++) {
            languageLOMGI[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralLanguage(lom,
                    i)));

        }

        //Extract General-description  
        String elementLOMGD =
                String.valueOf(LOMUtil.getString(LOMUtil.getGeneralDescription(lom,
                numGeneral_Description), 0));

        //Extracts number of general descriptions
        while ((!elementLOMGD.equals("null"))) {
            numGeneral_Description++;
            elementLOMGD =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralDescription(lom,
                    numGeneral_Description), 0));

        }

        SourceGD =
                new String[numGeneral_Description][];
        lanGD =
                new String[numGeneral_Description][];
        NumberGeneralDescriptions =
                numGeneral_Description;
        //For each description parent get number of childs an fill the description.
        for (int i =
                0; i < numGeneral_Description; i++) {
            elementLOMGD =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralDescription(lom,
                    i), numGeneral_Description_Childrens));

            while ((!elementLOMGD.equals("null"))) {
                numGeneral_Description_Childrens++;

                elementLOMGD =
                        String.valueOf(LOMUtil.getString(LOMUtil.getGeneralDescription(lom,
                        i), numGeneral_Description_Childrens));

            }
            SourceGD[i] =
                    new String[numGeneral_Description_Childrens];
            lanGD[i] =
                    new String[numGeneral_Description_Childrens];

            for (int j =
                    0; j < numGeneral_Description_Childrens; j++) {
                SourceGD[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getGeneralDescription(lom,
                        i), j));
                lanGD[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getGeneralDescription(lom,
                        i), j));

            }


            numGeneral_Description_Childrens =
                    0;
        }






        //Extract keyword
        String elementLOMGK =
                String.valueOf(LOMUtil.getString(LOMUtil.getGeneralKeyword(lom,
                numGeneral_Keyword), 0));

        //Extracts number of general Keywords
        while ((!elementLOMGK.equals("null"))) {
            numGeneral_Keyword++;
            elementLOMGK =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralKeyword(lom,
                    numGeneral_Keyword), 0));

        }

        SourceGK =
                new String[numGeneral_Keyword][];
        lanGK =
                new String[numGeneral_Keyword][];
        NumberGeneralKeywords =
                numGeneral_Keyword;
        //For each Keyword parent get number of childs an fill the Keyword.
        for (int i =
                0; i < numGeneral_Keyword; i++) {
            elementLOMGK =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralKeyword(lom,
                    i), numGeneral_Keyword_Childrens));

            while ((!elementLOMGK.equals("null"))) {
                numGeneral_Keyword_Childrens++;

                elementLOMGK =
                        String.valueOf(LOMUtil.getString(LOMUtil.getGeneralKeyword(lom,
                        i), numGeneral_Keyword_Childrens));

            }
            SourceGK[i] =
                    new String[numGeneral_Keyword_Childrens];
            lanGK[i] =
                    new String[numGeneral_Keyword_Childrens];

            for (int j =
                    0; j < numGeneral_Keyword_Childrens; j++) {
                SourceGK[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getGeneralKeyword(lom,
                        i), j));
                lanGK[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getGeneralKeyword(lom,
                        i), j));

            }


            numGeneral_Keyword_Childrens =
                    0;
        }


        //Extract Coverage
        String elementLOMGC =
                String.valueOf(LOMUtil.getString(LOMUtil.getGeneralCoverage(lom,
                numGeneral_Coverage), 0));

        //Extracts number of general Coverage
        while ((!elementLOMGC.equals("null"))) {
            numGeneral_Coverage++;
            elementLOMGC =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralCoverage(lom,
                    numGeneral_Coverage), 0));

        }

        SourceGC =
                new String[numGeneral_Coverage][];
        lanGC =
                new String[numGeneral_Coverage][];
        NumberGeneralCoverages =
                numGeneral_Coverage;
        //For each Coverage parent get number of childs an fill the Coverage.
        for (int i =
                0; i < numGeneral_Coverage; i++) {
            elementLOMGC =
                    String.valueOf(LOMUtil.getString(LOMUtil.getGeneralCoverage(lom,
                    i), numGeneral_Coverage_Childrens));

            while ((!elementLOMGC.equals("null"))) {
                numGeneral_Coverage_Childrens++;

                elementLOMGC =
                        String.valueOf(LOMUtil.getString(LOMUtil.getGeneralCoverage(lom,
                        i), numGeneral_Coverage_Childrens));

            }
            SourceGC[i] =
                    new String[numGeneral_Coverage_Childrens];
            lanGC[i] =
                    new String[numGeneral_Coverage_Childrens];

            for (int j =
                    0; j < numGeneral_Coverage_Childrens; j++) {
                SourceGC[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getGeneralCoverage(lom,
                        i), j));
                lanGC[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getGeneralCoverage(lom,
                        i), j));

            }


            numGeneral_Coverage_Childrens =
                    0;
        }


        //extract structure
        General_Structure_Source =
                String.valueOf(LOMUtil.getSource(LOMUtil.getGeneralStructure(lom)));
        General_Structure_Value =
                String.valueOf(LOMUtil.getValue(LOMUtil.getGeneralStructure(lom)));


        //Extract aggregation level
        General_AggregationLevel_Source =
                String.valueOf(LOMUtil.getSource(LOMUtil.getGeneralAggregationLevel(lom)));
        General_AggregationLevel_Value =
                String.valueOf(LOMUtil.getValue(LOMUtil.getGeneralAggregationLevel(lom)));

    }

    private void extractLifeCycle() {
        int numLifeCycle_Version =
                0;
        int numLifeCycle_Contribute =
                0;
        int numLifeCycle_Contribute_Entities =
                0;
        int numLifeCycle_Contribute_Descriptions =
                0;
        //Extract version
        String versionLV =
                String.valueOf(LOMUtil.getString(LOMUtil.getLifeCycleVersion(lom),
                numLifeCycle_Version));

        while ((!versionLV.equals("null"))) {
            numLifeCycle_Version++;

            versionLV =
                    String.valueOf(LOMUtil.getString(LOMUtil.getLifeCycleVersion(lom),
                    numLifeCycle_Version));

        }
        verLV =
                new String[numLifeCycle_Version];
        lanLV =
                new String[numLifeCycle_Version];
        for (int i =
                0; i < numLifeCycle_Version; i++) {
            verLV[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getLifeCycleVersion(lom),
                    i));
            lanLV[i] =
                    String.valueOf(LOMUtil.getLanguage(LOMUtil.getLifeCycleVersion(lom),
                    i));

        }

        //Extract Status
        LifeCycle_Status_Source =
                String.valueOf(LOMUtil.getSource(LOMUtil.getLifeCycleStatus(lom)));
        LifeCycle_Status_Value =
                String.valueOf(LOMUtil.getValue(LOMUtil.getLifeCycleStatus(lom)));



        //Extract contribute


        //Extracts number of Lifecycle Contribute
        String LC =
                String.valueOf(LOMUtil.getLifeCycleContribute(lom, 0));
        while ((!LC.equals("null"))) {
            numLifeCycle_Contribute++;
            LC =
                    String.valueOf(LOMUtil.getLifeCycleContribute(lom,
                    numLifeCycle_Contribute));

        }

        entityLC =
                new VCard[numLifeCycle_Contribute][];
        DateTimeLC =
                new Date[numLifeCycle_Contribute];
        DateDescriptionLC =
                new String[numLifeCycle_Contribute][];
        LanguageDateDescriptionLC =
                new String[numLifeCycle_Contribute][];

        SourceRoleLC =
                new String[numLifeCycle_Contribute];
        ValueRoleLC =
                new String[numLifeCycle_Contribute];
        NumberLifeCycleContributes =
                numLifeCycle_Contribute;
        String elementLOMLC;
        //For each Contribute parent get number of entities and dates.
        for (int i =
                0; i < numLifeCycle_Contribute; i++) {
            SourceRoleLC[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getLifeCycleContributeRole(lom,
                    i)));
            ValueRoleLC[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getLifeCycleContributeRole(lom,
                    i)));

            // DateTimeLC[i]=(LOMUtil.getDateTime(LOMUtil.getLifeCycleContributeDate(lom, i)));

            elementLOMLC =
                    String.valueOf(LOMUtil.getLifeCycleContributeEntity(lom, i,
                    numLifeCycle_Contribute_Entities));

            while ((!elementLOMLC.equals("null"))) {
                numLifeCycle_Contribute_Entities++;

                elementLOMLC =
                        String.valueOf(LOMUtil.getLifeCycleContributeEntity(lom,
                        i, numLifeCycle_Contribute_Entities));

            }
            entityLC[i] =
                    new VCard[numLifeCycle_Contribute_Entities];


            for (int j =
                    0; j < numLifeCycle_Contribute_Entities; j++) {
                entityLC[i][j] =
                        LOMUtil.getLifeCycleContributeEntity(lom, i, j).vcard();



            }


            numLifeCycle_Contribute_Entities =
                    0;

            if (LOMUtil.getDescription(LOMUtil.getLifeCycleContributeDate(lom, i)) !=
                    null) {
                elementLOMLC =
                        String.valueOf(LOMUtil.getLifeCycleContributeDate(lom, i).
                        description().string(numLifeCycle_Contribute_Descriptions));

                while ((!elementLOMLC.equals("null"))) {
                    numLifeCycle_Contribute_Descriptions++;

                    elementLOMLC =
                            String.valueOf(LOMUtil.getLifeCycleContributeDate(lom,
                            i).description().string(numLifeCycle_Contribute_Descriptions));

                }
            }
            DateDescriptionLC[i] =
                    new String[numLifeCycle_Contribute_Descriptions];
            LanguageDateDescriptionLC[i] =
                    new String[numLifeCycle_Contribute_Descriptions];


            for (int j =
                    0; j < numLifeCycle_Contribute_Descriptions; j++) {
                DateDescriptionLC[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getDescription(LOMUtil.getLifeCycleContributeDate(lom,
                        i)), j));
                LanguageDateDescriptionLC[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getDescription(LOMUtil.getLifeCycleContributeDate(lom,
                        i)), j));

            }

        }



    }

    private void extractMetaMetadata() {

        int numMetaMetadata_Identifiers =
                0;
        int numMetaMetadata_Contribute =
                0;
        int numMetaMetadata_Contribute_Entities =
                0;
        int numMetaMetadata_Contribute_Descriptions =
                0;
        int numMetaMetadata_Schema =
                0;
        //Extract MetaMetadata-Identifier
        while ((LOMUtil.getCatalog(LOMUtil.getMetaMetadataIdentifier(lom,
                numMetaMetadata_Identifiers)) != null)) {
            numMetaMetadata_Identifiers++;
        }
        catalogMI =
                new String[numMetaMetadata_Identifiers];
        entryMI =
                new String[numMetaMetadata_Identifiers];
        for (int i =
                0; i < numMetaMetadata_Identifiers; i++) {
            catalogMI[i] =
                    String.valueOf(LOMUtil.getCatalog(LOMUtil.getMetaMetadataIdentifier(lom,
                    i)));
            entryMI[i] =
                    String.valueOf(LOMUtil.getEntry(LOMUtil.getMetaMetadataIdentifier(lom,
                    i)));

        }

        //Extract MetaMetadata-contribute


        //Extracts number of MetaMetadata Contribute
        String x =
                String.valueOf(LOMUtil.getMetaMetadataContribute(lom,
                numMetaMetadata_Contribute));
        while ((!x.equals("null"))) {
            numMetaMetadata_Contribute++;
            x =
                    String.valueOf(LOMUtil.getMetaMetadataContribute(lom,
                    numMetaMetadata_Contribute));

        }

        entityMC =
                new VCard[numMetaMetadata_Contribute][];
        DateTimeMC =
                new Date[numMetaMetadata_Contribute];
        DateDescriptionMC =
                new String[numMetaMetadata_Contribute][];
        LanguageDateDescriptionMC =
                new String[numMetaMetadata_Contribute][];

        SourceRoleMC =
                new String[numMetaMetadata_Contribute];
        ValueRoleMC =
                new String[numMetaMetadata_Contribute];
        NumberMetaMetadataContributes =
                numMetaMetadata_Contribute;
        String elementLOMMC;
        //For each Contribute parent get number of entities and dates.
        for (int i =
                0; i < numMetaMetadata_Contribute; i++) {
            SourceRoleMC[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getMetaMetadataContributeRole(lom,
                    i)));
            ValueRoleMC[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getMetaMetadataContributeRole(lom,
                    i)));
            //DateTimeMC[i]=(LOMUtil.getDateTime(LOMUtil.getMetaMetadataContributeDate(lom, i));

            elementLOMMC =
                    String.valueOf(LOMUtil.getMetaMetadataContributeEntity(lom,
                    i, numMetaMetadata_Contribute_Entities));

            while ((!elementLOMMC.equals("null"))) {
                numMetaMetadata_Contribute_Entities++;

                elementLOMMC =
                        String.valueOf(LOMUtil.getMetaMetadataContributeEntity(lom,
                        i, numMetaMetadata_Contribute_Entities));

            }
            entityMC[i] =
                    new VCard[numMetaMetadata_Contribute_Entities];


            for (int j =
                    0; j < numMetaMetadata_Contribute_Entities; j++) {
                entityMC[i][j] =
                        LOMUtil.getMetaMetadataContributeEntity(lom, i, j).vcard();



            }


            numMetaMetadata_Contribute_Entities =
                    0;

            if (LOMUtil.getDescription(LOMUtil.getMetaMetadataContributeDate(lom,
                    i)) != null) {
                elementLOMMC =
                        String.valueOf(LOMUtil.getMetaMetadataContributeDate(lom,
                        i).description().string(numMetaMetadata_Contribute_Descriptions));

                while ((!elementLOMMC.equals("null"))) {
                    numMetaMetadata_Contribute_Descriptions++;

                    elementLOMMC =
                            String.valueOf(LOMUtil.getMetaMetadataContributeDate(lom,
                            i).description().string(numMetaMetadata_Contribute_Descriptions));

                }
            }
            DateDescriptionMC[i] =
                    new String[numMetaMetadata_Contribute_Descriptions];
            LanguageDateDescriptionMC[i] =
                    new String[numMetaMetadata_Contribute_Descriptions];


            for (int j =
                    0; j < numMetaMetadata_Contribute_Descriptions; j++) {
                DateDescriptionMC[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getDescription(LOMUtil.getMetaMetadataContributeDate(lom,
                        i)), j));
                LanguageDateDescriptionMC[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getDescription(LOMUtil.getMetaMetadataContributeDate(lom,
                        i)), j));


            }
        }

        //Extract MetaMetadata-schema
        while (LOMUtil.getMetaMetadataMetadataSchema(lom, numMetaMetadata_Schema) !=
                null) {
            numMetaMetadata_Schema++;
        }
        schemaLOMMS =
                new String[numMetaMetadata_Schema];
        for (int i =
                0; i < numMetaMetadata_Schema; i++) {
            schemaLOMMS[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getMetaMetadataMetadataSchema(lom,
                    i)));

        }

        //Extract MetaMetadata Language
        MetaMetadata_Language =
                String.valueOf(LOMUtil.getString(LOMUtil.getMetaMetadataLanguage(lom)));



    }

    private void extractTechnical() {
        int numTechnical_Formats =
                0;
        int numTechnical_Locations =
                0;
        int numTechnical_Requirements =
                0;
        int numTechnical_Requirements_Childrens =
                0;
        int numTechnical_InstallationRemarks =
                0;
        int numTechnical_OtherPlatformRequirements =
                0;
        int numTechnical_DurationDescriptions =
                0;
        //Extract Technical-Format
        while (LOMUtil.getTechnicalFormat(lom, numTechnical_Formats) != null) {
            numTechnical_Formats++;
        }
        formatTF =
                new String[numTechnical_Formats];
        for (int i =
                0; i < numTechnical_Formats; i++) {
            formatTF[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalFormat(lom,
                    i)));

        }


        //Extract MetaMetadata Language
        Technical_Size =
                String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalSize(lom)));



        //Extract Technical-Location
        while (LOMUtil.getTechnicalLocation(lom, numTechnical_Locations) != null) {
            numTechnical_Locations++;
        }
        locationTL =
                new String[numTechnical_Locations];
        for (int i =
                0; i < numTechnical_Locations; i++) {
            locationTL[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalLocation(lom,
                    i)));

        }


        //Extract Technical Requirements

        //Extracts number of Technical requirements
        String x =
                String.valueOf(LOMUtil.getTechnicalRequirement(lom,
                numTechnical_Requirements));
        while (!(x.equals("null"))) {
            numTechnical_Requirements++;
            x =
                    String.valueOf(LOMUtil.getTechnicalRequirement(lom,
                    numTechnical_Requirements));

        }

        SourceTRType =
                new String[numTechnical_Requirements][];
        ValueTRType =
                new String[numTechnical_Requirements][];
        SourceTRName =
                new String[numTechnical_Requirements][];
        ValueTRName =
                new String[numTechnical_Requirements][];
        MinVerTR =
                new String[numTechnical_Requirements][];
        MaxVerTR =
                new String[numTechnical_Requirements][];
        NumberTechnicalRequirements =
                numTechnical_Requirements;
        NumberTechnicalOrComposites =
                new int[numTechnical_Requirements];
        String elementLOMTR;
        //For each Requierement parent get number of OrComposites.
        for (int i =
                0; i < numTechnical_Requirements; i++) {
            elementLOMTR =
                    String.valueOf(LOMUtil.getTechnicalRequirementOrComposite(lom,
                    i, numTechnical_Requirements_Childrens));

            while ((!elementLOMTR.equals("null"))) {
                numTechnical_Requirements_Childrens++;

                elementLOMTR =
                        String.valueOf(LOMUtil.getTechnicalRequirementOrComposite(lom,
                        i, numTechnical_Requirements_Childrens));

            }
            SourceTRType[i] =
                    new String[numTechnical_Requirements_Childrens];
            ValueTRType[i] =
                    new String[numTechnical_Requirements_Childrens];
            SourceTRName[i] =
                    new String[numTechnical_Requirements_Childrens];
            ValueTRName[i] =
                    new String[numTechnical_Requirements_Childrens];
            MinVerTR[i] =
                    new String[numTechnical_Requirements_Childrens];
            MaxVerTR[i] =
                    new String[numTechnical_Requirements_Childrens];
            NumberTechnicalOrComposites[i] =
                    numTechnical_Requirements_Childrens;


            for (int j =
                    0; j < numTechnical_Requirements_Childrens; j++) {


                SourceTRType[i][j] =
                        String.valueOf(LOMUtil.getSource(LOMUtil.getTechnicalRequirementOrCompositeType(lom,
                        i, j)));
                ValueTRType[i][j] =
                        String.valueOf(LOMUtil.getValue(LOMUtil.getTechnicalRequirementOrCompositeType(lom,
                        i, j)));
                SourceTRName[i][j] =
                        String.valueOf(LOMUtil.getSource(LOMUtil.getTechnicalRequirementOrCompositeName(lom,
                        i, j)));
                ValueTRName[i][j] =
                        String.valueOf(LOMUtil.getValue(LOMUtil.getTechnicalRequirementOrCompositeName(lom,
                        i, j)));
                MinVerTR[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalRequirementOrCompositeMinimumVersion(lom,
                        i, j)));
                MaxVerTR[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalRequirementOrCompositeMaximumVersion(lom,
                        i, j)));



            }


            numTechnical_Requirements_Childrens =
                    0;



        }

        //Extract Technical-intallation remarks
        String InstRemTIR =
                String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalInstallationRemarks(lom),
                numTechnical_InstallationRemarks));

        while ((!InstRemTIR.equals("null"))) {
            numTechnical_InstallationRemarks++;

            InstRemTIR =
                    String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalInstallationRemarks(lom),
                    numTechnical_InstallationRemarks));

        }
        InstallationRemarksTIR =
                new String[numTechnical_InstallationRemarks];
        languageTIR =
                new String[numTechnical_InstallationRemarks];
        for (int i =
                0; i < numTechnical_InstallationRemarks; i++) {
            InstallationRemarksTIR[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalInstallationRemarks(lom),
                    i));
            languageTIR[i] =
                    String.valueOf(LOMUtil.getLanguage(LOMUtil.getTechnicalInstallationRemarks(lom),
                    i));


        }


        //Extract Technical-other platform requirements
        String TOPR =
                String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalOtherPlatformRequirements(lom),
                numTechnical_OtherPlatformRequirements));

        while ((!TOPR.equals("null"))) {
            numTechnical_OtherPlatformRequirements++;

            TOPR =
                    String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalOtherPlatformRequirements(lom),
                    numTechnical_OtherPlatformRequirements));

        }
        PlatformTOPR =
                new String[numTechnical_OtherPlatformRequirements];
        languageTOPR =
                new String[numTechnical_OtherPlatformRequirements];
        for (int i =
                0; i < numTechnical_OtherPlatformRequirements; i++) {
            PlatformTOPR[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getTechnicalOtherPlatformRequirements(lom),
                    i));
            languageTOPR[i] =
                    String.valueOf(LOMUtil.getLanguage(LOMUtil.getTechnicalOtherPlatformRequirements(lom),
                    i));


        }


        //Extract Technical-duration
        Technical_Duration =
                String.valueOf(LOMUtil.getDuration(LOMUtil.getTechnicalDuration(lom)));
        String descTDD =
                String.valueOf(LOMUtil.getDescription(LOMUtil.getTechnicalDuration(lom)));

        while ((!descTDD.equals("null"))) {
            numTechnical_DurationDescriptions++;

            descTDD =
                    String.valueOf(LOMUtil.getTechnicalDuration(lom).description().
                    string(numTechnical_DurationDescriptions));

        }
        DurationDescriptionsTDD =
                new String[numTechnical_DurationDescriptions];
        LanguageDurationDescriptionsTDD =
                new String[numTechnical_DurationDescriptions];


        for (int j =
                0; j < numTechnical_DurationDescriptions; j++) {
            DurationDescriptionsTDD[j] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getDescription(LOMUtil.getTechnicalDuration(lom)),
                    j));
            LanguageDurationDescriptionsTDD[j] =
                    String.valueOf(LOMUtil.getLanguage(LOMUtil.getDescription(LOMUtil.getTechnicalDuration(lom)),
                    j));


        }

    }

    private void extractEducational() {
        int numEducational_LearningResourceType =
                0;
        int numEducational_IntendedEndUserRole =
                0;
        int numEducational_Context =
                0;
        int numEducational =
                0;
        int numEducational_TypicalAgeRange =
                0;
        int numEducational_TypicalAgeRange_Languages =
                0;
        int numEducationl_TypicalLearningTime_Descriptions =
                0;
        int numEducational_Descriptions =
                0;
        int numEducational_Descriptions_Languages =
                0;
        int numEducational_Languages =
                0;
        String educ =
                String.valueOf(LOMUtil.getEducational(lom, numEducational));
        while (!educ.equals("null")) {
            numEducational++;
            educ =
                    String.valueOf(LOMUtil.getEducational(lom, numEducational));

        }
        SourceInteractivityTypeEIT =
                new String[numEducational];
        ValueInteractivityTypeEIT =
                new String[numEducational];
        SourceLearningResourceTypeELRT =
                new String[numEducational][];
        ValueLearningResourceTypeELRT =
                new String[numEducational][];
        SourceInteractivityLevelEIL =
                new String[numEducational];
        ValueInteractivityLevelEIL =
                new String[numEducational];
        SourceSemanticDensityESD =
                new String[numEducational];
        ValueSemanticDensityESD =
                new String[numEducational];
        SourceIntendedEndUserRoleEIEUR =
                new String[numEducational][];
        ValueIntendedEndUserRoleEIEUR =
                new String[numEducational][];
        SourceContextEC =
                new String[numEducational][];
        ValueContextEC =
                new String[numEducational][];
        TypicalAgeRangeStringETAR =
                new String[numEducational][][];
        TypicalAgeRangeLanguageETAR =
                new String[numEducational][][];
        SourceDifficultyED =
                new String[numEducational];
        ValueDifficultyED =
                new String[numEducational];
        TypicalLearningTimeETLT =
                new String[numEducational];
        DescriptionETLT =
                new String[numEducational][];
        LanguageDescriptionETLT =
                new String[numEducational][];
        DescriptionED =
                new String[numEducational][][];
        LanguageDescriptionED =
                new String[numEducational][][];
        LanguageEL =
                new String[numEducational][];
        NumberEducationalTypicalAgeRanges =
                new int[numEducational];
        NumberEducationalDescriptions =
                new int[numEducational];
        NumberEducationals =
                numEducational;

        for (int i =
                0; i < numEducational; i++) {
            //Extract Educational-Interactivity Type 
            SourceInteractivityTypeEIT[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalInteractivityType(lom,
                    i)));
            ValueInteractivityTypeEIT[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalInteractivityType(lom,
                    i)));


            //Extract Educational-Learning Resource Type
            String ELRT =
                    String.valueOf(LOMUtil.getEducationalLearningResourceType(lom,
                    i, numEducational_LearningResourceType));
            while (!ELRT.equals("null")) {
                numEducational_LearningResourceType++;
                ELRT =
                        String.valueOf(LOMUtil.getEducationalLearningResourceType(lom,
                        i, numEducational_LearningResourceType));

            }

            SourceLearningResourceTypeELRT[i] =
                    new String[numEducational_LearningResourceType];
            ValueLearningResourceTypeELRT[i] =
                    new String[numEducational_LearningResourceType];
            for (int j =
                    0; j < numEducational_LearningResourceType; j++) {
                SourceLearningResourceTypeELRT[i][j] =
                        String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalLearningResourceType(lom,
                        i, j)));
                ValueLearningResourceTypeELRT[i][j] =
                        String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalLearningResourceType(lom,
                        i, j)));

            }
            numEducational_LearningResourceType =
                    0;

            //Extract Educational -Interactivity Level
            SourceInteractivityLevelEIL[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalInteractivityLevel(lom,
                    i)));
            ValueInteractivityLevelEIL[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalInteractivityLevel(lom,
                    i)));


            //Extract Educational-Semantic Density
            SourceSemanticDensityESD[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalSemanticDensity(lom,
                    i)));
            ValueSemanticDensityESD[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalSemanticDensity(lom,
                    i)));


            //Extract Educational-Intended End User Role
            String EIEUR =
                    String.valueOf(LOMUtil.getEducationalIntendedEndUserRole(lom,
                    i, numEducational_IntendedEndUserRole));
            while (!EIEUR.equals("null")) {
                numEducational_IntendedEndUserRole++;
                EIEUR =
                        String.valueOf(LOMUtil.getEducationalIntendedEndUserRole(lom,
                        i, numEducational_IntendedEndUserRole));

            }

            SourceIntendedEndUserRoleEIEUR[i] =
                    new String[numEducational_IntendedEndUserRole];
            ValueIntendedEndUserRoleEIEUR[i] =
                    new String[numEducational_IntendedEndUserRole];
            for (int j =
                    0; j < numEducational_IntendedEndUserRole; j++) {
                SourceIntendedEndUserRoleEIEUR[i][j] =
                        String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalIntendedEndUserRole(lom,
                        i, j)));
                ValueIntendedEndUserRoleEIEUR[i][j] =
                        String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalIntendedEndUserRole(lom,
                        i, j)));

            }
            numEducational_IntendedEndUserRole =
                    0;

            //Extract Educational-Context
            String EC =
                    String.valueOf(LOMUtil.getEducationalContext(lom, i,
                    numEducational_Context));
            while (!EC.equals("null")) {
                numEducational_Context++;
                EC =
                        String.valueOf(LOMUtil.getEducationalContext(lom, i,
                        numEducational_Context));

            }

            SourceContextEC[i] =
                    new String[numEducational_Context];
            ValueContextEC[i] =
                    new String[numEducational_Context];
            for (int j =
                    0; j < numEducational_Context; j++) {
                SourceContextEC[i][j] =
                        String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalContext(lom,
                        i, j)));
                ValueContextEC[i][j] =
                        String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalContext(lom,
                        i, j)));

            }
            numEducational_Context =
                    0;

            //Extract Educational-Typical Age Range
            String ETAR =
                    String.valueOf(LOMUtil.getEducationalTypicalAgeRange(lom, i,
                    numEducational_TypicalAgeRange));
            while (!ETAR.equals("null")) {
                numEducational_TypicalAgeRange++;
                ETAR =
                        String.valueOf(LOMUtil.getEducationalTypicalAgeRange(lom,
                        i, numEducational_TypicalAgeRange));

            }

            TypicalAgeRangeStringETAR[i] =
                    new String[numEducational_TypicalAgeRange][];
            TypicalAgeRangeLanguageETAR[i] =
                    new String[numEducational_TypicalAgeRange][];
            NumberEducationalTypicalAgeRanges[i] =
                    numEducational_TypicalAgeRange;
            for (int j =
                    0; j < numEducational_TypicalAgeRange; j++) {
                String ETARS =
                        String.valueOf(LOMUtil.getString(LOMUtil.getEducationalTypicalAgeRange(lom,
                        i, j), numEducational_TypicalAgeRange_Languages));
                while (!ETARS.equals("null")) {
                    numEducational_TypicalAgeRange_Languages++;
                    ETARS =
                            String.valueOf(LOMUtil.getString(LOMUtil.getEducationalTypicalAgeRange(lom,
                            i, j), numEducational_TypicalAgeRange_Languages));
                }

                TypicalAgeRangeStringETAR[i][j] =
                        new String[numEducational_TypicalAgeRange_Languages];
                TypicalAgeRangeLanguageETAR[i][j] =
                        new String[numEducational_TypicalAgeRange_Languages];

                for (int k =
                        0; k < numEducational_TypicalAgeRange_Languages; k++) {
                    TypicalAgeRangeStringETAR[i][j][k] =
                            String.valueOf(LOMUtil.getString(LOMUtil.getEducationalTypicalAgeRange(lom,
                            i, j), k));
                    TypicalAgeRangeLanguageETAR[i][j][k] =
                            String.valueOf(LOMUtil.getLanguage(LOMUtil.getEducationalTypicalAgeRange(lom,
                            i, j), k));

                }
                numEducational_TypicalAgeRange_Languages =
                        0;
            }
            numEducational_TypicalAgeRange =
                    0;


            //Extract Educational-Difficulty
            SourceDifficultyED[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getEducationalDifficulty(lom,
                    i)));
            ValueDifficultyED[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getEducationalDifficulty(lom,
                    i)));


            //Extract Educational-Typical Learning Time
            TypicalLearningTimeETLT[i] =
                    String.valueOf(LOMUtil.getDuration(LOMUtil.getEducationalTypicalLearningTime(lom,
                    i)));
            if (LOMUtil.getDescription(LOMUtil.getEducationalTypicalLearningTime(lom,
                    i)) != null) {
                String ETLT =
                        String.valueOf(LOMUtil.getEducationalTypicalLearningTime(lom,
                        i).description().string(numEducationl_TypicalLearningTime_Descriptions));
                while (!ETLT.equals("null")) {
                    numEducationl_TypicalLearningTime_Descriptions++;
                    ETLT =
                            String.valueOf(LOMUtil.getEducationalTypicalLearningTime(lom,
                            i).description().string(numEducationl_TypicalLearningTime_Descriptions));
                }
            }
            DescriptionETLT[i] =
                    new String[numEducationl_TypicalLearningTime_Descriptions];
            LanguageDescriptionETLT[i] =
                    new String[numEducationl_TypicalLearningTime_Descriptions];

            for (int j =
                    0; j < numEducationl_TypicalLearningTime_Descriptions; j++) {
                DescriptionETLT[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getDescription(LOMUtil.getEducationalTypicalLearningTime(lom,
                        i)), j));
                LanguageDescriptionETLT[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getDescription(LOMUtil.getEducationalTypicalLearningTime(lom,
                        i)), j));

            }
            numEducationl_TypicalLearningTime_Descriptions =
                    0;

            //Extracts educational- description   
            String ED =
                    String.valueOf(LOMUtil.getEducationalDescription(lom, i,
                    numEducational_Descriptions));

            while ((!ED.equals("null"))) {
                numEducational_Descriptions++;
                ED =
                        String.valueOf(LOMUtil.getEducationalDescription(lom, i,
                        numEducational_Descriptions));

            }

            DescriptionED[i] =
                    new String[numEducational_Descriptions][];
            LanguageDescriptionED[i] =
                    new String[numEducational_Descriptions][];
            NumberEducationalDescriptions[i] =
                    numEducational_Descriptions;

            for (int j =
                    0; j < numEducational_Descriptions; j++) {
                String EDL =
                        String.valueOf(LOMUtil.getString(LOMUtil.getEducationalDescription(lom,
                        i, j), numEducational_Descriptions_Languages));

                while ((!EDL.equals("null"))) {
                    numEducational_Descriptions_Languages++;

                    EDL =
                            String.valueOf(LOMUtil.getString(LOMUtil.getEducationalDescription(lom,
                            i, j), numEducational_Descriptions_Languages));

                }
                DescriptionED[i][j] =
                        new String[numEducational_Descriptions_Languages];
                LanguageDescriptionED[i][j] =
                        new String[numEducational_Descriptions_Languages];

                for (int k =
                        0; k < numEducational_Descriptions_Languages; k++) {
                    DescriptionED[i][j][k] =
                            String.valueOf(LOMUtil.getString(LOMUtil.getEducationalDescription(lom,
                            i, j), k));
                    LanguageDescriptionED[i][j][k] =
                            String.valueOf(LOMUtil.getLanguage(LOMUtil.getEducationalDescription(lom,
                            i, j), k));

                }


                numEducational_Descriptions_Languages =
                        0;
            }
            numEducational_Descriptions =
                    0;

            //Extract Educational-language
            while (LOMUtil.getEducationalLanguage(lom, i,
                    numEducational_Languages) != null) {
                numEducational_Languages++;
            }
            LanguageEL[i] =
                    new String[numEducational_Languages];
            for (int j =
                    0; j < numEducational_Languages; j++) {
                LanguageEL[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getEducationalLanguage(lom,
                        i, j)));

            }
            numEducational_Languages =
                    0;
        }
        numEducational =
                0;
    }

    private void extractRights() {
        int numRights_Descriptions =
                0;
        //Extract Rights-Cost
        Rights_Cost_Source =
                String.valueOf(LOMUtil.getSource(LOMUtil.getRightsCost(lom)));
        Rights_Cost_Value =
                String.valueOf(LOMUtil.getValue(LOMUtil.getRightsCost(lom)));


        //Extract Rights-Copyright and other restrictions
        Rights_CopyRightAndOtherRestrictions_Source =
                String.valueOf(LOMUtil.getSource(LOMUtil.getRightsCopyrightAndOtherRestrictions(lom)));
        Rights_CopyRightAndOtherRestrictions_Value =
                String.valueOf(LOMUtil.getValue(LOMUtil.getRightsCopyrightAndOtherRestrictions(lom)));


        //Extract Rights-Description
        String DescRD =
                String.valueOf(LOMUtil.getString(LOMUtil.getRightsDescription(lom),
                numRights_Descriptions));
        while ((!DescRD.equals("null"))) {
            numRights_Descriptions++;

            DescRD =
                    String.valueOf(LOMUtil.getString(LOMUtil.getRightsDescription(lom),
                    numRights_Descriptions));
        }
        DescriptionRD =
                new String[numRights_Descriptions];
        LanguageDescriptionRD =
                new String[numRights_Descriptions];
        for (int i =
                0; i < numRights_Descriptions; i++) {
            DescriptionRD[i] =
                    String.valueOf(LOMUtil.getString(LOMUtil.getRightsDescription(lom),
                    i));
            LanguageDescriptionRD[i] =
                    String.valueOf(LOMUtil.getLanguage(LOMUtil.getRightsDescription(lom),
                    i));


        }
    }

    private void extractRelation() {
        int numRelation_Descriptions =
                0;
        int numRelation_Descriptions_Languages =
                0;
        int numRelations =
                0;
        int numRelation_Resource_Identifiers =
                0;
        String rel =
                String.valueOf(LOMUtil.getRelation(lom, numRelations));
        while (!rel.equals("null")) {
            numRelations++;
            rel =
                    String.valueOf(LOMUtil.getRelation(lom, numRelations));

        }

        SourceKindRK =
                new String[numRelations];
        ValueKindRK =
                new String[numRelations];
        CatalogRRI =
                new String[numRelations][];
        EntryRRI =
                new String[numRelations][];
        DescriptionRRD =
                new String[numRelations][][];
        LanguageDescriptionRRD =
                new String[numRelations][][];
        NumberRelationDescriptions =
                new int[numRelations];
        NumberRelations =
                numRelations;

        for (int i =
                0; i < numRelations; i++) {
            //Extract Relation-Kind
            SourceKindRK[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getRelationKind(lom,
                    i)));
            ValueKindRK[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getRelationKind(lom,
                    i)));


            //Extract Relation-Resource-Identifier
            String RRI =
                    String.valueOf(LOMUtil.getRelationResourceIdentifier(lom, i,
                    numRelation_Resource_Identifiers));
            while (!RRI.equals("null")) {
                numRelation_Resource_Identifiers++;
                RRI =
                        String.valueOf(LOMUtil.getRelationResourceIdentifier(lom,
                        i, numRelation_Resource_Identifiers));
            }

            CatalogRRI[i] =
                    new String[numRelation_Resource_Identifiers];
            EntryRRI[i] =
                    new String[numRelation_Resource_Identifiers];

            for (int j =
                    0; j < numRelation_Resource_Identifiers; j++) {
                CatalogRRI[i][j] =
                        String.valueOf(LOMUtil.getCatalog(LOMUtil.getRelationResourceIdentifier(lom,
                        i, j)));
                EntryRRI[i][j] =
                        String.valueOf(LOMUtil.getEntry(LOMUtil.getRelationResourceIdentifier(lom,
                        i, j)));

            }
            numRelation_Resource_Identifiers =
                    0;


            //Extracts Relation- Resource-description   
            String RRD =
                    String.valueOf(LOMUtil.getRelationResourceDescription(lom, i,
                    numRelation_Descriptions));

            while ((!RRD.equals("null"))) {
                numRelation_Descriptions++;
                RRD =
                        String.valueOf(LOMUtil.getRelationResourceDescription(lom,
                        i, numRelation_Descriptions));

            }

            DescriptionRRD[i] =
                    new String[numRelation_Descriptions][];
            LanguageDescriptionRRD[i] =
                    new String[numRelation_Descriptions][];
            NumberRelationDescriptions[i] =
                    numRelation_Descriptions;
            for (int j =
                    0; j < numRelation_Descriptions; j++) {
                String RRDL =
                        String.valueOf(LOMUtil.getString(LOMUtil.getRelationResourceDescription(lom,
                        i, j), numRelation_Descriptions_Languages));

                while ((!RRDL.equals("null"))) {
                    numRelation_Descriptions_Languages++;

                    RRDL =
                            String.valueOf(LOMUtil.getString(LOMUtil.getRelationResourceDescription(lom,
                            i, j), numRelation_Descriptions_Languages));

                }
                DescriptionRRD[i][j] =
                        new String[numRelation_Descriptions_Languages];
                LanguageDescriptionRRD[i][j] =
                        new String[numRelation_Descriptions_Languages];

                for (int k =
                        0; k < numRelation_Descriptions_Languages; k++) {
                    DescriptionRRD[i][j][k] =
                            String.valueOf(LOMUtil.getString(LOMUtil.getRelationResourceDescription(lom,
                            i, j), k));
                    LanguageDescriptionRRD[i][j][k] =
                            String.valueOf(LOMUtil.getLanguage(LOMUtil.getRelationResourceDescription(lom,
                            i, j), k));

                }


                numRelation_Descriptions_Languages =
                        0;
            }
            numRelation_Descriptions =
                    0;
        }
        numRelations =
                0;


    }

    private void extractAnnotation() {
        int numAnnotations =
                0;
        int numAnnotation_DateDescriptions =
                0;
        int numAnnotation_Descriptions =
                0;
        String Ann =
                String.valueOf(LOMUtil.getAnnotation(lom, numAnnotations));
        while (!Ann.equals("null")) {
            numAnnotations++;
            Ann =
                    String.valueOf(LOMUtil.getAnnotation(lom, numAnnotations));

        }

        EntityAE =
                new VCard[numAnnotations];
        DateAD =
                new Date[numAnnotations];
        DateDescriptionAD =
                new String[numAnnotations][];
        LanguageDateDescriptionAD =
                new String[numAnnotations][];
        DescriptionAD =
                new String[numAnnotations][];
        LanguageDescriptionAD =
                new String[numAnnotations][];

        NumberAnnotations =
                numAnnotations;

        for (int i =
                0; i < numAnnotations; i++) {
            //Exrtact Annotation-Entity
            if (LOMUtil.getAnnotationEntity(lom, i) != null) {
                EntityAE[i] =
                        LOMUtil.getAnnotationEntity(lom, i).vcard();

            }

            //Extract Annotation-Date
            //DateAD[i]=(LOMUtil.getDateTime(LOMUtil.getAnnotationDate(lom, i)));

            if (LOMUtil.getDescription(LOMUtil.getAnnotationDate(lom, i)) !=
                    null) {
                String ADD =
                        String.valueOf(LOMUtil.getAnnotationDate(lom, i).
                        description().string(numAnnotation_DateDescriptions));
                while (!ADD.equals("null")) {
                    numAnnotation_DateDescriptions++;
                    ADD =
                            String.valueOf(LOMUtil.getAnnotationDate(lom, i).
                            description().string(numAnnotation_DateDescriptions));
                }
            }
            DateDescriptionAD[i] =
                    new String[numAnnotation_DateDescriptions];
            LanguageDateDescriptionAD[i] =
                    new String[numAnnotation_DateDescriptions];

            for (int j =
                    0; j < numAnnotation_DateDescriptions; j++) {
                DateDescriptionAD[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getDescription(LOMUtil.getAnnotationDate(lom,
                        i)), j));
                LanguageDateDescriptionAD[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getDescription(LOMUtil.getAnnotationDate(lom,
                        i)), j));

            }
            numAnnotation_DateDescriptions =
                    0;

            //Extract Annotation-Description
            String DescAD =
                    String.valueOf(LOMUtil.getString(LOMUtil.getAnnotationDescription(lom,
                    i), numAnnotation_Descriptions));
            while ((!DescAD.equals("null"))) {
                numAnnotation_Descriptions++;

                DescAD =
                        String.valueOf(LOMUtil.getString(LOMUtil.getAnnotationDescription(lom,
                        i), numAnnotation_Descriptions));
            }
            DescriptionAD[i] =
                    new String[numAnnotation_Descriptions];
            LanguageDescriptionAD[i] =
                    new String[numAnnotation_Descriptions];
            for (int j =
                    0; j < numAnnotation_Descriptions; j++) {
                DescriptionAD[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getAnnotationDescription(lom,
                        i), j));
                LanguageDescriptionAD[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getAnnotationDescription(lom,
                        i), j));


            }
            numAnnotation_Descriptions =
                    0;
        }
        numAnnotations =
                0;
    }

    private void extractClassification() {
        int numClassifications =
                0;
        int numClassification_TaxonPaths =
                0;
        int numClassification_TaxonPath_Sources =
                0;
        int numClassification_TaxonPath_Taxons =
                0;
        int numClassification_TaxonPath_Taxon_Entries =
                0;
        int numClassification_Descriptions =
                0;
        int numClassification_Keywords =
                0;
        int numClassification_Keyword_Languages =
                0;
        String cla =
                String.valueOf(LOMUtil.getClassification(lom, numClassifications));
        while (!cla.equals("null")) {
            numClassifications++;
            cla =
                    String.valueOf(LOMUtil.getClassification(lom,
                    numClassifications));

        }

        SourcePurposeCP =
                new String[numClassifications];
        ValuePurposeCP =
                new String[numClassifications];
        StringSourceCTP =
                new String[numClassifications][][];
        LanguageSourceCTP =
                new String[numClassifications][][];
        IDTaxonCTP =
                new String[numClassifications][][];
        StringEntryTaxonCTP =
                new String[numClassifications][][][];
        LanguageEntryTaxonCTP =
                new String[numClassifications][][][];
        DescriptionCD =
                new String[numClassifications][];
        LanguageDescriptionCD =
                new String[numClassifications][];
        KeywordCK =
                new String[numClassifications][][];
        LanguageKeywordCK =
                new String[numClassifications][][];
        NumberClassificationTaxonPaths =
                new int[numClassifications];
        NumberClassifications =
                numClassifications;
        NumberClassificationKeywords =
                new int[numClassifications];

        for (int i =
                0; i < numClassifications; i++) {
            //Exrtact Classification-Purpose
            SourcePurposeCP[i] =
                    String.valueOf(LOMUtil.getSource(LOMUtil.getClassificationPurpose(lom,
                    i)));
            ValuePurposeCP[i] =
                    String.valueOf(LOMUtil.getValue(LOMUtil.getClassificationPurpose(lom,
                    i)));


            //Extract Classification -Taxon Path
            String tax =
                    String.valueOf(LOMUtil.getClassificationTaxonPath(lom, i,
                    numClassification_TaxonPaths));
            while (!tax.equals("null")) {
                numClassification_TaxonPaths++;
                tax =
                        String.valueOf(LOMUtil.getClassificationTaxonPath(lom, i,
                        numClassification_TaxonPaths));

            }
            StringSourceCTP[i] =
                    new String[numClassification_TaxonPaths][];
            LanguageSourceCTP[i] =
                    new String[numClassification_TaxonPaths][];
            StringEntryTaxonCTP[i] =
                    new String[numClassification_TaxonPaths][][];
            LanguageEntryTaxonCTP[i] =
                    new String[numClassification_TaxonPaths][][];
            IDTaxonCTP[i] =
                    new String[numClassification_TaxonPaths][];
            NumberClassificationTaxonPaths[i] =
                    numClassification_TaxonPaths;
            for (int j =
                    0; j < numClassification_TaxonPaths; j++) {
                //Extract Classification -Taxon Path-Source
                String taxSource =
                        String.valueOf(LOMUtil.getString(LOMUtil.getClassificationTaxonPathSource(lom,
                        i, j), numClassification_TaxonPath_Sources));
                while (!taxSource.equals("null")) {
                    numClassification_TaxonPath_Sources++;
                    taxSource =
                            String.valueOf(LOMUtil.getString(LOMUtil.getClassificationTaxonPathSource(lom,
                            i, j), numClassification_TaxonPath_Sources));

                }
                StringSourceCTP[i][j] =
                        new String[numClassification_TaxonPath_Sources];
                LanguageSourceCTP[i][j] =
                        new String[numClassification_TaxonPath_Sources];
                for (int k =
                        0; k < numClassification_TaxonPath_Sources; k++) {
                    StringSourceCTP[i][j][k] =
                            String.valueOf(LOMUtil.getString(LOMUtil.getClassificationTaxonPathSource(lom,
                            i, j), k));
                    LanguageSourceCTP[i][j][k] =
                            String.valueOf(LOMUtil.getLanguage(LOMUtil.getClassificationTaxonPathSource(lom,
                            i, j), k));

                }

                numClassification_TaxonPath_Sources =
                        0;

                //Extract Classification -Taxon Path-TaxonID
                String taxon =
                        String.valueOf(LOMUtil.getClassificationTaxonPathTaxon(lom,
                        i, j, numClassification_TaxonPath_Taxons));
                while (!taxon.equals("null")) {
                    numClassification_TaxonPath_Taxons++;
                    taxon =
                            String.valueOf(LOMUtil.getClassificationTaxonPathTaxon(lom,
                            i, j, numClassification_TaxonPath_Taxons));

                }
                IDTaxonCTP[i][j] =
                        new String[numClassification_TaxonPath_Taxons];
                StringEntryTaxonCTP[i][j] =
                        new String[numClassification_TaxonPath_Taxons][];
                LanguageEntryTaxonCTP[i][j] =
                        new String[numClassification_TaxonPath_Taxons][];

                for (int k =
                        0; k < numClassification_TaxonPath_Taxons; k++) {
                    IDTaxonCTP[i][j][k] =
                            String.valueOf(LOMUtil.getString(LOMUtil.getClassificationTaxonPathTaxonId(lom,
                            i, j, k)));



                    String taxEntry =
                            String.valueOf(LOMUtil.getClassificationTaxonPathTaxonEntry(lom,
                            i, j, numClassification_TaxonPath_Taxon_Entries));
                    while (!taxEntry.equals("null")) {
                        numClassification_TaxonPath_Taxon_Entries++;
                        taxEntry =
                                String.valueOf(LOMUtil.getString(LOMUtil.getClassificationTaxonPathTaxonEntry(lom,
                                i, j, k),
                                numClassification_TaxonPath_Taxon_Entries));

                    }
                    StringEntryTaxonCTP[i][j][k] =
                            new String[numClassification_TaxonPath_Taxon_Entries];
                    LanguageEntryTaxonCTP[i][j][k] =
                            new String[numClassification_TaxonPath_Taxon_Entries];
                    for (int l =
                            0; l < numClassification_TaxonPath_Taxon_Entries;
                            l++) {
                        StringEntryTaxonCTP[i][j][k][l] =
                                String.valueOf(LOMUtil.getString(LOMUtil.getClassificationTaxonPathTaxonEntry(lom,
                                i, j, k), l));
                        LanguageEntryTaxonCTP[i][j][k][l] =
                                String.valueOf(LOMUtil.getLanguage(LOMUtil.getClassificationTaxonPathTaxonEntry(lom,
                                i, j, k), l));


                    }
                    numClassification_TaxonPath_Taxon_Entries =
                            0;
                }

                numClassification_TaxonPath_Taxons =
                        0;
            }
            numClassification_TaxonPaths =
                    0;

            //Extract Classification-Description
            String DescCD =
                    String.valueOf(LOMUtil.getString(LOMUtil.getClassificationDescription(lom,
                    i), numClassification_Descriptions));
            while ((!DescCD.equals("null"))) {
                numClassification_Descriptions++;

                DescCD =
                        String.valueOf(LOMUtil.getString(LOMUtil.getClassificationDescription(lom,
                        i), numClassification_Descriptions));
            }
            DescriptionCD[i] =
                    new String[numClassification_Descriptions];
            LanguageDescriptionCD[i] =
                    new String[numClassification_Descriptions];
            for (int j =
                    0; j < numClassification_Descriptions; j++) {
                DescriptionCD[i][j] =
                        String.valueOf(LOMUtil.getString(LOMUtil.getClassificationDescription(lom,
                        i), j));
                LanguageDescriptionCD[i][j] =
                        String.valueOf(LOMUtil.getLanguage(LOMUtil.getClassificationDescription(lom,
                        i), j));


            }
            numClassification_Descriptions =
                    0;

            //Extract Classification Keyword

            String ClassK =
                    String.valueOf(LOMUtil.getClassificationKeyword(lom, i,
                    numClassification_Keywords));

            while ((!ClassK.equals("null"))) {
                numClassification_Keywords++;
                ClassK =
                        String.valueOf(LOMUtil.getClassificationKeyword(lom, i,
                        numClassification_Keywords));

            }

            KeywordCK[i] =
                    new String[numClassification_Keywords][];
            LanguageKeywordCK[i] =
                    new String[numClassification_Keywords][];
            NumberClassificationKeywords[i] =
                    numClassification_Keywords;
            for (int j =
                    0; j < numClassification_Keywords; j++) {
                String ClassKL =
                        String.valueOf(LOMUtil.getString(LOMUtil.getClassificationKeyword(lom,
                        i, j), numClassification_Keyword_Languages));

                while ((!ClassKL.equals("null"))) {
                    numClassification_Keyword_Languages++;

                    ClassKL =
                            String.valueOf(LOMUtil.getString(LOMUtil.getClassificationKeyword(lom,
                            i, j), numClassification_Keyword_Languages));

                }
                KeywordCK[i][j] =
                        new String[numClassification_Keyword_Languages];
                LanguageKeywordCK[i][j] =
                        new String[numClassification_Keyword_Languages];

                for (int k =
                        0; k < numClassification_Keyword_Languages; k++) {
                    KeywordCK[i][j][k] =
                            String.valueOf(LOMUtil.getString(LOMUtil.getClassificationKeyword(lom,
                            i, j), k));
                    LanguageKeywordCK[i][j][k] =
                            String.valueOf(LOMUtil.getLanguage(LOMUtil.getClassificationKeyword(lom,
                            i, j), k));

                }
                numClassification_Keyword_Languages =
                        0;
            }
            numClassification_Keywords =
                    0;
        }
        numClassifications =
                0;

    }
}


